<?php 
/**
 * 订单管理控制器
 */
class OrderController extends Controller{
	/**
	 * 显示订单
	 */
	public function index(){
		$data = M('orders')->all();
		$this->assign('order_data',$data);
		$this->display();
	}
	/**
	 * 订单列表
	 */
	public function order_list(){
		$data = M('order_list')->all();
		$this->assign('ol_data',$data);
		$this->display();
	}
	/**
	 * 删除订单列表
	 */
	public function del_ol(){ 
		$olid = Q('get.olid','0','intval');
		M('order_list')->where("olid='{$olid}'")->delete();
		$this->success('删除订单成功',U("order_list"),0.5);
	}


	/**
	 * 删除订单
	 */
	public function del_order(){
		$oid = Q('get.oid','0','intval');
		M('orders')->where("oid='{$oid}'")->delete();
		$this->success('删除订单成功',U("index"),0.5);
	}
}








 ?>